package com.example.aicooking.entity.dto;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;


/**
 * DTO类：
 * 保护敏感信息，部分数据的校验
 */
@Data
public class UserUpdateDTO {
    @NotNull(message = "用户ID不能为空")
    private Long userId;
    @Size(max = 32, message = "昵称长度不能超过32个字符")
    private String nickname;
    @Size(max = 200, message = "签名长度不能超过200个字符")
    private String signature;
    private Integer gender;
    private Integer age;
    private String avatar;
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;
}
